package com.wtw;

import com.service.TestInterFace;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <strong>Title : <br></strong>
 * <strong>Package : <br></strong>
 * <strong>Description : </strong><br>
 * <strong>Create on : 2018/6/13<br></strong>
 * <p>
 *
 * @author tengwei.wang<br>
 * @version <strong>v1.0.0</strong><br>
 *          <br>
 *          <strong>修改历史:</strong><br>
 *          修改人 | 修改日期 | 修改描述<br>
 *          -------------------------------------------<br>
 *          <br>
 *          <br>
 */

@Controller
@EnableAutoConfiguration
@ComponentScan(basePackages={"com.*"})//添加的注解
public class TestBootController {

    @Autowired
    private TestInterFace testInterFace;

    private final Logger logger = LoggerFactory.getLogger(TestBootController.class);

    @RequestMapping("/num")
    @ResponseBody
    int home(){
        int i = testInterFace.testInterFace();
        logger.info("====================TestBootController getUser info==========");
        return i;
    }


}
